package Util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Others {
    public static boolean isSameDay(long lastdate,long nowdate)
    {
        Date d1=new Date(lastdate);
        Date d2=new Date(nowdate);
        String sd1= new SimpleDateFormat("yyyy-MM-dd").format(d1);
        String sd2= new SimpleDateFormat("yyyy-MM-dd").format(d2);
        return sd1.equals(sd2);
    }
    public static boolean isrunningDay(long lastdate,long nowdate)
    {
        Date d1=new Date(lastdate+24*60*60*1000);
        Date d2=new Date(nowdate);
        String sd1= new SimpleDateFormat("yyyy-MM-dd").format(d1);
        String sd2= new SimpleDateFormat("yyyy-MM-dd").format(d2);
        return sd1.equals(sd2);
    }
}
